﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BusinessLogicLayer;
using Entities;

namespace project_exam
{
    public partial class FormThemHV : Form
    {
        public FormThemHV()
        {
            InitializeComponent();
        }

        private HocVienBLL bllHV;
        private HocVienEntity hv;
        private void btnThemHV_Click(object sender, EventArgs e)
        {
            hv = new HocVienEntity();
            hv.MaHocVien = txtMaHV.Text;
            hv.HoTen = txtTenHV.Text;
            hv.SDT = Convert.ToDecimal(txtSDT.Text);
            hv.Email = txtEmail.Text;
            hv.GhiChu = txtGhiChu.Text;

            if (bllHV.addHocVien(hv) > 0)
                MessageBox.Show("Thêm thành công! Bạn muốn xem lại thông tin học viên này không", "Dancing Center", MessageBoxButtons.OK, MessageBoxIcon.Information);
            else
                MessageBox.Show("Chua Them Đc");
        }

        private void FormThemHV_Load(object sender, EventArgs e)
        {
            bllHV = new HocVienBLL();
        }
    }
}
